package com.yun.studyconsumer.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class TopicReceiver {

    @RabbitListener(queues = "topic.man")
    @RabbitHandler
    public void process1(Map<String,Object> msg){
        System.out.println("Topic man 收到信息： " + msg.toString());
    }

    @RabbitListener(queues = "topic.woman")
    @RabbitHandler
    public void process2(Map<String,Object> msg){
        System.out.println("Topic woman 收到信息： " + msg.toString());
    }
}
